package com.sweet.pay.controller;

import com.alibaba.fastjson.JSONObject;
import com.sweet.pay.dto.HelloDTO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;

@RestController
@RequestMapping("/sweet/pay")
public class DemoController {

  @GetMapping("/hello")
  public JSONObject hello() {
    JSONObject j = new JSONObject();
    j.put("time", LocalDateTime.now().toString());
    return j;
  }
}
